package com.javaclimb.drug.common;

import com.javaclimb.drug.entity.ILogInfo;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;

public class LogUtil {
    public static ILogInfo getLogInfo(String message) throws ParseException {
        ILogInfo logInfo=new ILogInfo();
        logInfo.setLogMessage(message);
        SimpleDateFormat time = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.UK);
        logInfo.setOperateTime(time.parse(time.format(new Date())));
        return logInfo;
    }
}
